import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'
import router from '@/router/index'
import App from './App.vue'
import 'amfe-flexible'
import * as Icons from '@ant-design/icons-vue'

//ant-design-vue
// import Antd from 'ant-design-vue';
// import 'ant-design-vue/dist/reset.css';

const app = createApp(App)

const pinia = createPinia()
// pinia防止页面刷新数据丢失
pinia.use(piniaPluginPersist)
 
app.use(pinia).use(router)

app.mount('#app')
// 全局使用图标，遍历引入
const icons: any = Icons
for (const i in icons) {
  app.component(i, icons[i])
}